package com.uton.rfidcontroller.view.activity;

import com.uton.rfidcontroller.R;
import com.uton.rfidcontroller.common.GlobalConstants;
import com.uton.rfidcontroller.databinding.ActivityCarDetailBinding;
import com.uton.rfidcontroller.view.base.BaseActivity;
import com.uton.rfidcontroller.viewmodel.activity_model.CarDetailActivityViewModel;

import io.reactivex.ObservableTransformer;

/**
 * Created by 王家宝 on 2017/10/11.
 * Email:639586819@qq.com
 * Tel:18241150668
 */

public class CarDetailActivity extends BaseActivity<ActivityCarDetailBinding, CarDetailActivityViewModel> {

    @Override
    protected int setLayout() {
        return R.layout.activity_car_detail;
    }

    @Override
    protected void inject() {
        getBinding().setModel(getViewModel());
    }

    @Override
    protected String setTitle() {
        return "车辆详情";
    }

    @Override
    protected void doSomething() {

    }

    @Override
    protected CarDetailActivityViewModel setViewModel() {
        return new CarDetailActivityViewModel(getIntent().getStringExtra(GlobalConstants.EXTRA_STRING_PARAM1)) {
            @Override
            public ObservableTransformer setObservable() {
                return compose(bindToLifecycle());
            }
        };
    }
}
